<template>
    <div>
        <div class="color-details">
            <div class="top">
                <div class="color-name">红色</div>
                <div class="more-less" @click="showOrHiddle">
                    <i class="el-icon-caret-right" v-show="rightFlag"></i>
                    <i class="el-icon-caret-bottom" v-show="bottomFlag"></i>
                </div>
            </div>
            <div class="line"></div>
            <div class="kinds" v-show="bottomFlag">
                <div class="kinds-num" >
                    <div class="kinds-num-img">
                        <img src="../../../../assets/images/swiper3.jpg" alt="">
                    </div>
                    <div class="kinds-num-name">
                        001
                    </div>  
                </div>

            </div>
        </div>
        
    </div>
</template>

<script>
export default {
    name:'GoodsDetailsColor',
    data(){
        return{
            rightFlag:true,
            bottomFlag:false
        }
    },
    methods:{
        showOrHiddle(){
            this.rightFlag=!this.rightFlag;
            this.bottomFlag=!this.bottomFlag;
        }
    }
}
</script>

<style lang='less' scoped>
.color-details{
    width: 353px;
    min-height: 46px;
    margin:7px 12px 10px 10px;
    
    .top{
        width: 100%;
        height: 45px;
        position: relative;
        background-color: white;
        .color-name{
            width: 29px;
            height: 24px;
            line-height: 24px;
            color: rgba(16, 16, 16, 1);
            font-size: 14px;
            text-align: left;
            font-family: Arial;
            position: absolute;
            top: 50%;
            left: 12px;
            margin-top: -12px; 
        }
        .more-less{
            width: 16px;
            height: 16px;
            line-height: 16px;
            position: absolute;
            top: 50%;
            right:17px;
            margin-top: -8px;
            font-size: 16px;
            color: rgba(153, 153, 153, 1);
        }
    }
    .line{
        width:100%;
        height: 1.5px;
        background-color: #F3F4F5;
    }
    .kinds{
        width: 100%;
        height: 184px;
        display: flex;
        flex-wrap: wrap;
        background-color: white;
        .kinds-num{
            flex: 0 0 20%;
            height: 88px;
            .kinds-num-img{
                width: 50px;
                height: 50px;
                margin: 0 auto;
                margin-top: 11px;
                border-radius: 50%;
                img{
                    width: 100%;
                    height: 100%;
                    border-radius: 50%;
                }
            }
            .kinds-num-name{
                width: 21px;
                height: 23px;
                line-height: 23px;
                color: rgba(16, 16, 16, 1);
                font-size: 12px;
                text-align: center;
                font-family: Arial;
                margin: 0 auto;
            }
        }
    }
}

</style>
